﻿// -----------------------------------------------------------------------------
// Generate By Furion Tools v3.0.6                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using HOPU.OnlineSchool.Core;

namespace HOPU.OnlineSchool.Core
{
    public partial class AclRole : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<AclRole, MasterDbContextLocator>
    {
    
        public string Id { get; set; }
        public string RoleName { get; set; }
        public string RoleCode { get; set; }
        public string Remark { get; set; }
        public byte IsDeleted { get; set; }
        public DateTime GmtCreate { get; set; }
        public DateTime GmtModified { get; set; }
    
        public void Configure(EntityTypeBuilder<AclRole> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.ToTable("acl_role");

                entityBuilder.Property(e => e.Id)
                    .HasMaxLength(19)
                    .HasColumnName("id")
                    .HasDefaultValueSql("''")
                    .IsFixedLength(true)
                    .HasComment("角色id");

                entityBuilder.Property(e => e.GmtCreate)
                    .HasColumnName("gmt_create")
                    .HasComment("创建时间");

                entityBuilder.Property(e => e.GmtModified)
                    .HasColumnName("gmt_modified")
                    .HasComment("更新时间");

                entityBuilder.Property(e => e.IsDeleted)
                    .HasColumnName("is_deleted")
                    .HasComment("逻辑删除 1（true）已删除， 0（false）未删除");

                entityBuilder.Property(e => e.Remark)
                    .HasMaxLength(255)
                    .HasColumnName("remark")
                    .HasComment("备注");

                entityBuilder.Property(e => e.RoleCode)
                    .HasMaxLength(20)
                    .HasColumnName("role_code")
                    .HasComment("角色编码");

                entityBuilder.Property(e => e.RoleName)
                    .IsRequired()
                    .HasMaxLength(20)
                    .HasColumnName("role_name")
                    .HasDefaultValueSql("''")
                    .HasComment("角色名称");
        }

    }
}
